From: Florian Müllner Date: Mon, 14 Aug 2023 23:55:47 +0000 (+0200) Subject: ci: Use sudo to run meson install X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~320^2^2~99 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d353f2d367;p=gnome-shell.git ci: Use sudo to run meson install Meson stopped using polkit for automatic privilege elevation, and will no longer attempt any priviledge elevation when not running interactively. Running the entire install command as root used to be problematic in the past, as it could result in ownership changes of files in the build directory that would result in build failures later, but the aforementioned change leaves us with little choice. Apparently `meson install` will spawn `ninja` with dropped privileges when a rebuild is needed, so hopefully this will no longer be an issue. Part-of: --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c2bfdc136..b00ad77de 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -175,11 +175,11 @@ build: before_script: - .gitlab-ci/checkout-mutter.sh - meson mutter mutter/build --prefix=/usr - - meson install -C mutter/build + - sudo meson install -C mutter/build script: - meson setup . build -Dbuildtype=debugoptimized -Dman=false --werror --fatal-meson-warnings - meson compile -C build - - meson install -C build + - sudo meson install -C build artifacts: expire_in: 1 day paths: @@ -194,7 +194,7 @@ test: XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir" NO_AT_BRIDGE: "1" before_script: - - meson install -C mutter/build + - sudo meson install -C mutter/build - mkdir -m 700 $XDG_RUNTIME_DIR script: - dbus-run-session -- xvfb-run meson test -C build --no-rebuild @@ -217,7 +217,7 @@ test-coverity: variables: GIT_SUBMODULE_STRATEGY: normal before_script: - - meson install -C mutter/build + - sudo meson install -C mutter/build script: - .gitlab-ci/download-coverity-tarball.sh - CC=clang meson coverity-build -Dman=false @@ -255,7 +255,7 @@ dist: stage: deploy needs: ["build"] before_script: - - meson install -C mutter/build + - sudo meson install -C mutter/build - mkdir -m 700 $XDG_RUNTIME_DIR script: - dbus-run-session xvfb-run meson dist -C build